package cn.org.intelli.zffserver.domain;


import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;
import java.util.Objects;

@Component
@ConfigurationProperties(prefix = "databasesource")
public class DataBasePattern {
    /* 13 */ JSONObject dbPatterns = new JSONObject();

    public String toString() {
        return "DataBasePattern(dbPatterns=" + getDbPatterns() + ")";
    }


    protected boolean canEqual(Object other) {
        return other instanceof cn.org.intelli.zffserver.domain.DataBasePattern;
    }

    public boolean equals(Object o) {
        if (o == this) return true;
        if (!(o instanceof cn.org.intelli.zffserver.domain.DataBasePattern)) return false;
        cn.org.intelli.zffserver.domain.DataBasePattern other = (cn.org.intelli.zffserver.domain.DataBasePattern) o;
        if (!other.canEqual(this)) return false;
        Object this$dbPatterns = getDbPatterns(), other$dbPatterns = other.getDbPatterns();
        return !(!Objects.equals(this$dbPatterns, other$dbPatterns));
    }

    public JSONObject getDbPatterns() {
        /* 18 */
        JSONObject trans = new JSONObject();
        /* 19 */
        for (Map.Entry entry : this.dbPatterns.entrySet()) {
            /* 20 */
            String dbType = entry.getKey().toString();
            /* 21 */
            JSONObject value = this.dbPatterns.getJSONObject(dbType);
            /* 22 */
            JSONArray params = new JSONArray();
            /* 23 */
            for (Map.Entry entry1 : value.entrySet()) {
                /* 24 */
                String key = entry1.getKey().toString();
                /* 25 */
                JSONObject atom = value.getJSONObject(key);
                /* 26 */
                params.add(atom);
            }
            /* 28 */
            trans.put(dbType, params);
        }
        /* 30 */
        return trans;
    }

    public void setDbPatterns(JSONObject dbPatterns) {
        this.dbPatterns = dbPatterns;
    }
}


/* Location:              C:\Users\admin\Desktop\xxm\zjg11\ZjgCaculate-v1.0.jar!\BOOT-INF\classes\cn\org\intelli\zffserver\domain\DataBasePattern.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */